/*    */ package com.zimbra.cs.filter.jsieve;
/*    */ 
/*    */ import com.google.common.base.Strings;
/*    */ import com.zimbra.cs.filter.ZimbraMailAdapter;
/*    */ import com.zimbra.cs.mime.ParsedAddress;
/*    */ import com.zimbra.cs.mime.ParsedMessage;
/*    */ import org.apache.jsieve.Arguments;
/*    */ import org.apache.jsieve.SieveContext;
/*    */ import org.apache.jsieve.exception.SieveException;
/*    */ import org.apache.jsieve.mail.MailAdapter;
/*    */ import org.apache.jsieve.tests.AbstractTest;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public final class TwitterTest
/*    */   extends AbstractTest
/*    */ {
/*    */   protected boolean executeBasic(MailAdapter mail, Arguments args, SieveContext ctx)
/*    */     throws SieveException
/*    */   {
/* 45 */     if (!(mail instanceof ZimbraMailAdapter)) {
/* 46 */       return false;
/*    */     }
/* 48 */     ZimbraMailAdapter adapter = (ZimbraMailAdapter)mail;
/* 49 */     ParsedAddress sender = adapter.getParsedMessage().getParsedSender();
/* 50 */     if (!Strings.isNullOrEmpty(sender.emailPart)) {
/* 51 */       String email = sender.emailPart.toLowerCase();
/* 52 */       if (email.equals("notify@twitter.com")) {
/* 53 */         return true;
/*    */       }
/*    */     }
/* 56 */     return false;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/filter/jsieve/TwitterTest.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */